# -*- coding:utf-8 -*-
"""
Author：Administrator
Date:2021年08月20日
"""
from docx.shared import Pt
from docx import Document


file = Document('./练习/练习3.docx')
# 所有段落的段前段后设置
# for para in file.paragraphs:
# 	para.paragraph_format.space_before = Pt(18)
# 	para.paragraph_format.space_after = Pt(12)

# 正文段前段后设置
for para in file.paragraphs:
	if para.style.name == 'Normal':
		para.paragraph_format.space_before = Pt(18)
		para.paragraph_format.space_after = Pt(12)

file.save('./练习/15结果02.docx')
